<?php

namespace Home\Controller;

class IndexController extends CommonController {
	
	
	function index(){
		//方法跳转
		$this->redirect('User/register');
	}
	
	//直播
	function zibo(){
		$ziboModel = D("Zibo");
		$vo = $ziboModel->order("id desc")->find();
		$list = explode("!", strip_tags($vo['zibo_data']));
		$data_list = array();
		foreach ($list as $key => $value) {
			$vo_list = explode(",", $value);
			array_push($data_list, $vo_list);
		}
// 		dump($data_list);
// 		dump($data_list);
		$this->assign('date',date('m月d号',time()));
		$this->assign('list',$data_list);
		$this->display();
	}
	
	//推送直播列表
// 	function js_zibo(){
// 		$ziboModel = D("Zibo");
// 		$vo = $ziboModel->order("id desc")->find();
// 		$list = explode("!", strip_tags($vo['zibo_data']));
// 		$data_list = array();
// 		foreach ($list as $key => $value) {
// 			$vo_list = explode(",", $value);
// 			array_push($data_list, $vo_list);
// 		}
		
// 		$json_data = json_encode($data_list,JSON_UNESCAPED_UNICODE);
// 		$url = 'http:dev.winyc18.com:2121/?type=publish&content='.$json_data;
// 		$this->get($url);
// 	}
	
// 	//更新直播数据
// 	function js_update(){
// 		$result = file_get_contents("http://bf.spbo1.com/s/s.xml");
// 		$url = 'http://dev.winyc18.com:2121/?type=update&content='.$result;
// 		$this->get($url);
// 	}
	
	function test() {
// 		$uid = time();
// 		$this->assign('uid',$uid);
// 		$this->display();
// 		$ycs = explode(",",'1,2,3,0,7,5,6,8,4,9');
// 		dump($ycs);
// 		$ycs = array_reverse($ycs);
// 		dump($ycs);
// 		die();
		$post = json_decode($GLOBALS['HTTP_RAW_POST_DATA'],true);
		if($post['user']=='lin'&&$post['password']==='123'){
			$data['success']=true;
		}else{
			$data['success']=false;
		}
		echo json_encode ($data,JSON_UNESCAPED_UNICODE );
		
	}
	
	function jstest(){
		dump(md5('13729036692'));
// 		$this->display();
	}
	
	function sql(){
// 		$user['id'] = I('id');
// 		$data['user'] = I('user');
// 		$data['pass'] = I('pass');
// 		$users = M("users");
// 		$res = $users->where($user)->save($data);
		$tj['name'] = I('name');
		dump($tj);
        $data['pass'] = '111111';
        $res = M("users")->where($tj)->save($data);
		dump($res);
		dump(M("user")->_sql());
	}
	
	function get($url, $param=array()){
		if(!is_array($param)){
			throw new Exception("参数必须为array");
		}
		$p='';
		foreach($param as $key => $value){
			$p=$p.$key.'='.$value.'&';
		}
		if(preg_match('/\?[\d\D]+/',$url)){//matched ?c
			$p='&'.$p;
		}else if(preg_match('/\?$/',$url)){//matched ?$
			$p=$p;
		}else{
			$p='?'.$p;
		}
		$p=preg_replace('/&$/','',$p);
		$url=$url.$p;
		//echo $url;
		$httph =curl_init($url);
		curl_setopt($httph, CURLOPT_SSL_VERIFYPEER, 0);
		curl_setopt($httph, CURLOPT_SSL_VERIFYHOST, 1);
		curl_setopt($httph,CURLOPT_RETURNTRANSFER,1);
		curl_setopt($httph, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
	
		curl_setopt($httph, CURLOPT_RETURNTRANSFER,1);
		curl_setopt($httph, CURLOPT_HEADER,1);
		$rst=curl_exec($httph);
		curl_close($httph);
		return $rst;
	}
	
	function buding(){
		$yc = '1,3,5';
		$jieguo = '0,4,0,5,6';
		
		$yc_ges = explode(",",$yc);
		$jieguos = explode(",",$jieguo);
		dump($yc_ges);
		dump($jieguos);
		$result = array_intersect($yc_ges,$jieguos);
		dump(count($result) !=false);
		
	}
	

	function ssc_get_buding_sm_data($result_tjsj,$weishu,$disnum,$zhouqi){
	
		$result_arr = array ();
		for($i = 0; $i < count ( $result_tjsj ); $i ++) {
	
			//获取前定位数字
			$ycs = explode(",", $result_tjsj[$i]['one']);
			// 		$ycs = array_reverse($ycs);//数组倒序
			$yc_ges = array();
			for($j=0;$j<$disnum;$j++){
				array_push($yc_ges,$ycs[$j]);
			}
			//排序,小到大
			sort($yc_ges);
			$yc_ge = implode(",",$yc_ges); //位数预测
			$i_bq =$result_tjsj[$i]['code_key'];
			//对预测值进行排序
			$data ['yc'] = $yc_ge;
			$data ['jiqj'] = $i_bq.'-'.($i_bq+$zhouqi-1).'期';
			// 对已开奖的结算
			$max = $i + $zhouqi - 1;
	
			if ($result_tjsj[$max]['code'] != null) {// 没开奖的不能统计
	
				if ($zhouqi == 1) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-'.$i_bq.'期-'.$result_tjsj [$i]['code'] ['hm'];
					} else {
						$jieguo = '挂';
						$jiezhi = '第1期-' .$i_bq.'期-' . $result_tjsj [$i] ['code'] ['hm'];
					}
				} else if ($zhouqi == 2) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' .($i_bq+1). '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else {
						$jieguo = '挂';
						$jiezhi = '第2期-' .($i_bq+1). '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					}
				} else if ($zhouqi == 3) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else {
						$jieguo = '挂';
						$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					}
				} else if ($zhouqi == 4) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else {
						$jieguo = '挂';
						$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					}
				} else if ($zhouqi == 5) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' .($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第3期-' . ($i_bq+2). '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else {
						$jieguo = '挂';
						$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					}
				} else if ($zhouqi == 6) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第4期-' .($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第5期-' . ($i_bq+4). '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else {
						$jieguo = '挂';
						$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}
				} else if ($zhouqi == 7) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}else {
						$jieguo = '挂';
						$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}
				}else if ($zhouqi == 8) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
						$i = $i + 7;
					}else {
						$jieguo = '挂';
						$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
						$i = $i + 7;
					}
				}else if ($zhouqi == 9) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
						$i = $i + 7;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+8]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
						$i = $i + 8;
					}else {
						$jieguo = '挂';
						$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
						$i = $i + 8;
					}
				}else if ($zhouqi == 10) {
					if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
						// 计划结果
						$jieguo = '中';
						$jiezhi = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i + 1] ['code'] ['hm'];
						$i = $i + 1;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i + 2] ['code'] ['hm'];
						$i = $i + 2;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i + 3] ['code'] ['hm'];
						$i = $i + 3;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i + 4] ['code'] ['hm'];
						$i = $i + 4;
					} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第6期-' . ($i_bq+5) . '期-' . $result_tjsj [$i + 5] ['code'] ['hm'];
						$i = $i + 5;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第7期-' . ($i_bq+6) . '期-' . $result_tjsj [$i + 6] ['code'] ['hm'];
						$i = $i + 6;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第8期-' . ($i_bq+7) . '期-' . $result_tjsj [$i + 7] ['code'] ['hm'];
						$i = $i + 7;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+8]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第9期-' . ($i_bq+8) . '期-' . $result_tjsj [$i + 8] ['code'] ['hm'];
						$i = $i + 8;
					}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+9]['code']['hm'], $weishu))) == false) {
						$jieguo = '中';
						$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
						$i = $i + 9;
					}else {
						$jieguo = '挂';
						$jiezhi = '第10期-' . ($i_bq+9) . '期-' . $result_tjsj [$i + 9] ['code'] ['hm'];
						$i = $i + 9;
					}
				}
	
	
				// 计划结果,第一期不中则第二期，中则从下期开始重新推荐，如果三期都不中，则从下期重新推荐
				$data ['jiezhi'] = $jiezhi;
				$data ['jieguo'] = $jieguo;
				array_push ( $result_arr, $data );
			} else {
				// 算周期
				if ($zhouqi == 1) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					}
					array_push ( $result_arr, $data );
				} else if ($zhouqi == 2) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					}
					array_push ( $result_arr, $data );
				} else if ($zhouqi == 3) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
							$i = $i + 2;
						}
					}
					array_push ( $result_arr, $data );
				} else if ($zhouqi == 4) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . substr_replace ( "000", ($i_bq + 2), - strlen ( ($i_bq) ) ) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
							$i = $i + 3;
						}
					}
					array_push ( $result_arr, $data );
				} else if ($zhouqi == 5) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
							$i = $i + 4;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi == 6) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
							$i = $i + 5;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi == 7) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
							$i = $i + 5;
						}
					} else if ($result_tjsj [$i + 6] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
							$i = $i + 6;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi ==8) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
							$i = $i + 5;
						}
					} else if ($result_tjsj [$i + 6] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
							$i = $i + 6;
						}
					}else if ($result_tjsj [$i + 7] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
							$i = $i + 7;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi ==9) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq+2) ) ) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . substr_replace ( "000", ($i_bq + 3), - strlen ( ($i_bq) ) ) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
							$i = $i + 5;
						}
					} else if ($result_tjsj [$i + 6] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
							$i = $i + 6;
						}
					}else if ($result_tjsj [$i + 7] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
							$i = $i + 7;
						}
					}else if ($result_tjsj [$i + 8] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+8]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
							$i = $i + 8;
						}else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
							$i = $i + 8;
						}
					}
					array_push ( $result_arr, $data );
				}else if ($zhouqi ==10) {
					if ($result_tjsj [$i] ['code'] == null) {
						$data ['jieguo'] = '等开';
						$data ['jiezhi'] = '第1期-' . $i_bq . '期进行中...';
					} else if ($result_tjsj [$i + 1] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期进行中...';
							$i = $i + 1;
						}
					} else if ($result_tjsj [$i + 2] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期进行中...';
							$i = $i + 2;
						}
					} else if ($result_tjsj [$i + 3] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期进行中...';
							$i = $i + 3;
						}
					} else if ($result_tjsj [$i + 4] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq+1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq+2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq+3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第5期-' . ($i_bq+4) . '期进行中...';
							$i = $i + 4;
						}
					} else if ($result_tjsj [$i + 5] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期进行中...';
							$i = $i + 5;
						}
					} else if ($result_tjsj [$i + 6] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期进行中...';
							$i = $i + 6;
						}
					}else if ($result_tjsj [$i + 7] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						} else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期进行中...';
							$i = $i + 7;
						}
					}else if ($result_tjsj [$i + 8] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+8]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
							$i = $i + 8;
						}else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期进行中...';
							$i = $i + 8;
						}
					}else if ($result_tjsj [$i + 9] ['code'] == null) {
						if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第1期-' . $i_bq . '期-' . $result_tjsj [$i] ['code'] ['hm'];
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+1]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第2期-' . ($i_bq + 1) . '期-' . $result_tjsj [$i+1] ['code'] ['hm'];
							$i = $i + 1;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+2]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第3期-' . ($i_bq + 2) . '期-' . $result_tjsj [$i+2] ['code'] ['hm'];
							$i = $i + 2;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+3]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第4期-' . ($i_bq + 3) . '期-' . $result_tjsj [$i+3] ['code'] ['hm'];
							$i = $i + 3;
						} else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+4]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第5期-' . ($i_bq + 4) . '期-' . $result_tjsj [$i+4] ['code'] ['hm'];
							$i = $i + 4;
						}else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+5]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第6期-' . ($i_bq + 5) . '期-' . $result_tjsj [$i+5] ['code'] ['hm'];
							$i = $i + 5;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+6]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第7期-' . ($i_bq + 6) . '期-' . $result_tjsj [$i+6] ['code'] ['hm'];
							$i = $i + 6;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+7]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第8期-' . ($i_bq + 7) . '期-' . $result_tjsj [$i+7] ['code'] ['hm'];
							$i = $i + 7;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+8]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第9期-' . ($i_bq + 8) . '期-' . $result_tjsj [$i+8] ['code'] ['hm'];
							$i = $i + 8;
						}  else if (count(array_intersect($yc_ges,ssc_arr_to_weishu($result_tjsj [$i+9]['code']['hm'], $weishu))) == false) {
							$data ['jieguo'] = '中';
							$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期-' . $result_tjsj [$i+9] ['code'] ['hm'];
							$i = $i + 9;
						}else {
							$data ['jieguo'] = '等开';
							$data ['jiezhi'] = '第10期-' . ($i_bq + 9) . '期进行中...';
							$i = $i + 9;
						}
					}
					array_push ( $result_arr, $data );
				}
			}
		}
		return $result_arr;
	
	}
	

	
	
}